﻿CREATE TABLE [dbo].[Commissions] (
    [CommissionId]         UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL,
    [AgentCountryId]       UNIQUEIDENTIFIER NULL,
    [PayeeCountryId]       UNIQUEIDENTIFIER NULL,
    [AgentGroupBranchId]   UNIQUEIDENTIFIER NULL,
    [PayeeGroupBranchId]   UNIQUEIDENTIFIER NULL,
    [AgentBranchId]        UNIQUEIDENTIFIER NULL,
    [PayeeBranchId]        UNIQUEIDENTIFIER NULL,
    [AgentPaymentMethodId] UNIQUEIDENTIFIER NULL,
    [PayeePaymentMethodId] UNIQUEIDENTIFIER NULL,
    [AgentCurrencyId]      UNIQUEIDENTIFIER NULL,
    [PayeeCurrencyId]      UNIQUEIDENTIFIER NULL,
    [RangeAmountFrom]      DECIMAL (18, 4)  NULL,
    [RangeAmountTo]        DECIMAL (18, 4)  NULL,
    [CompanyFixed]         DECIMAL (18, 4)  NULL,
    [CompanyPercentual]    DECIMAL (18, 4)  NULL,
    [CustomerFixed]        DECIMAL (18, 4)  NULL,
    [CustomerPercentual]   DECIMAL (18, 4)  NULL,
    [RangeDateFrom]        DATETIME         NULL,
    [RangeDateTo]          DATETIME         NULL,
    [OperationTypeId]      UNIQUEIDENTIFIER NULL,
    [CommissionType]       VARCHAR (50)     NOT NULL
);

